#include <iostream>
#include <vector>
#include <set>
using namespace std;

vector<int> GetLeastNumbers_Solution(vector<int> input, int k)
{
    vector<int> res;
    multiset<int> s;

    if (k > input.size())
    {
        return res;
    }
        
    for (auto i : input)
    {
        s.insert(i);
    }
    int i = 0;
    for (set<int>::iterator it = s.begin(); it != s.end() && i < k; it++, i++)
    {
        res.push_back(*it);

    }
    return res;
}